<template>
  <div>
    <div class="top-bar_2">
      <van-nav-bar
        left-text="关闭"
        title="收到的红包"
        :border="false"
        left-arrow
        @click-left="onClickLeft"
      >
        <template #right>
          <van-icon name="ellipsis" size="18" />
        </template>
      </van-nav-bar>
    </div>
    <div class="main">
      <div class="Arcbox"></div>
      <div class="Headpicture">
        <img :src="iconUrl + $store.state.redPackageInfo[0].userImage" alt="" />
      </div>
      <div class="content_info">
        <div class="title_name">
          {{ $store.state.redPackageInfo[0].user }}发出的红包
        </div>
        <div class="titel_msg">
          {{ Decode($store.state.redPackageInfo[0].msg) }}
        </div>
        <div class="title_price">
          {{ $store.state.redPackageInfo[0].red_amount }}.00<span>元</span>
        </div>
        <div class="titel_tip">红包会提现到您的账户余额，可能存在一定延迟</div>
      </div>
    </div>
  </div>
</template>
<script>
let Base64 = require("js-base64").Base64; //用于字符串编码 解码 用来存储表情

export default {
  data() {
    return {};
  },
  methods: {
    onClickLeft() {
      this.$router.go(-1);
    },
    Decode(t) {
      return Base64.decode(t);
    },
  },
};
</script>
<style lang="less" scoped>
.van-nav-bar {
  background-color: #ef4c2d;
}
.main {
  position: relative;
  width: 100vw;
  //   height: 100vh;
  .Arcbox {
    width: 100vw;
    height: 9.5vh;
    position: absolute;
    top: -1px;
    background-color: #ef4c2d;
    border-radius: 0 0 80% 80%;
    left: 0;
    right: 0;
  }
  .Headpicture {
    width: 50px;
    height: 50px;
    position: absolute;
    border: 2px solid white;
    border-radius: 50%;
    left: 50%;
    top: 50%;
    transform: translate(-50%, 50%);
    img {
      width: 100%;
      height: 100%;
      border-radius: 50%;
    }
  }
  .content_info {
    position: absolute;
    left: 50%;
    top: 23vh;
    transform: translate(-50%, -50%);
    div {
      margin: 8px;
    }
    .title_name {
      text-align: center;
      white-space: nowrap;

      color: #3d4144;
      font-size: 19px;
    }
    .titel_msg {
      text-align: center;
      color: #9999;
      font-size: 18px;
    }
    .title_price {
      font-size: 30px;
      text-align: center;
      color: #ef4c2d;
      span {
        font-size: 16px;
        margin-left: 4px;
      }
    }
    .titel_tip {
      text-align: center;
      white-space: nowrap;
      color: #9999;
    }
  }
}
</style>